import request from '@/utils/request'

// 查询栏目通知列表
export function listNotice(query) {
  return request({
    //路径与后端的controller中的一致
    url: '/publish/notice/list',
    method: 'get',
    params: query
  })
}
//通过栏目id查找文章
export function listArticleByColumn(query) {
  return request({
    //路径与后端的controller中的一致
    url: '/publish/notice/article',
    method: 'get',
    params: query
  })
}
//通过发布时间查找栏目名称
export function  listColumnByPublish(query){
  return request({
    url:'publish/notice/column',
    method:'get',
    params:query
  })
}
//添加栏目通知
export function addNotice(data) {
  return request({
    url: '/publish/notice',
    method: 'post',
    data: data
  })
}
//删除栏目通知
export function delNotice(noticeId) {
  return request({
    url: '/publish/notice/' + noticeId,
    method: 'delete'
  })
}
export function  listArticle(query){
  return request({
    url:'publish/notice/articles',
    method:'get',
    params:query
  })
}
